<?php
$this->breadcrumbs=array(
	'Пользователи'=>array('index'),
	'Управление',
);
?>
<h1>Управление пользователями</h1>

<ul class="actions">
	<li><?php echo CHtml::link('List User',array('index')); ?></li>
	<li><?php echo CHtml::link('Create User',array('create')); ?></li>
</ul><!-- actions -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'dataProvider'=>$dataProvider,
	'columns'=>array(
		'contract',
		'username',
		'balance',
		array(
			'name'=>'packet_id',
			'value'=>'$data->packet->name',
		),
		'blocked_by_bill:boolean',
		array(
			'class'=>'CButtonColumn',
			'viewButtonImageUrl'=>'/css/ico/view.png',
			'updateButtonImageUrl'=>'/css/ico/edit.png',
			'deleteButtonImageUrl'=>'/css/ico/del.png',
			'template'=>'{pay} {view} {update} {delete}',
			'htmlOptions'=>array('class'=>'button-column4'),
			'buttons'=>array(
				'pay' => array(
    				'label'=>'Pay',     // text label of the button
    				'url'=>'Yii::app()->controller->createUrl("/payment/pay",array("id"=>$data->primaryKey))',       // the PHP expression for generating the URL of the button
    				'imageUrl'=>'/css/ico/pay.png',  // image URL of the button. If not set or false, a text link is used
    			),
    		),
		),
	),
)); ?>
